<?php

class DefaultController extends YWSController
{
	public function init() {   
    }
    
    public function actionIndex()
    {
        $this->setPageTitle('Dashboard');
		YWSMessenger::SendMesssage("Xin chao den voi test");
        // Test Locale
        //echo YWSConfigs::getLocale();
        // Test Messenger
        //YWSMessenger::$_MESSAGE = "Hello World";
        // Test Translations
     	//echo YWSTranslations::getTranslation("Hello World");
      	//echo YWSHtml::localize("Hello World");
        $this->redirect(array("/administrator/default/test"));
        $this->render('index');
    }
    
    public function actionChangeLanguage() {        
        echo $_GET['lang'];
        if (isset($_GET['lang'])) {
            YWSLanguage::switchLanguage($_GET['lang']);
            $this->redirect(array('Default/index'));
        }
    }
    
    public function actionTest() {
        $this->render('test');
    }
}